package cn.yuli.decorator.impl;

import cn.yuli.component.Beverage;
/**
 * 装饰模式：奶油装饰器器
 * @author yuli
 *
 */
public class Whip extends Beverage {
	private Beverage beverage;//被装饰组件
	
	public Whip(Beverage beverage) {
		super();
		this.beverage = beverage;
	}
	@Override
	public String getDescription() {
		return beverage.getDescription() + ",奶油";
	}
	@Override
	public double cost() {
		return .13 + beverage.cost();
	}

}
